var news;
$(function () {
    news = new Vue({
        el:'#newsController',
        data:{
            id:_id,
            item:{},
            isAuction:0,
            url:''
        },
        methods:{
            loadData:function () {
                var that = this;
                sy.post('/web/index/newsDetail',{id:_id},function (data) {
                    if (data.errorCode){
                        location.href = sy.path+"/web";
                    }else{
                        that.item = data.data;
                        if (that.item.targetContent){
                            that.loadArt(that.item.targetContent);
                        }
                    }
                })
            },
            loadArt:function (id) {
                var that = this;
                sy.post('/web/art/detail',{
                    id:id
                },function(data){
                    if (data.code == 0){
                        that.isAuction = data.auctionType;
                        that.url = sy.path+'/web/auction/'+id;
                    }
                })
            }
        },
        created:function () {
            this.loadData();
        }
    });
})